// 区域管理
import request from "@/request/request"

export default {
  // 获取 auth 链接
  getAuthLink() {
    return request("get", "usermanager/oauth/")
  },

  //获取token
  getAuthToken(data) {
    return request("post", "/oauth/service/getToken/", data)
  },

  //获取tokenUser
  getAuthUser(data){
    return request("post", "/oauth/service/getUser/", data)

  },

  // 获取用户登录信息
  getUserData(code) {
    return request("post", `usermanager/oauth/?code=${code}`)
  },

  // 获取认证系统列表
  getQAuthList() {
    return request("get", `/usermanager/auth_list/`)
  },

  // 添加认证系统
  appendQAuth(data) {
    return request("post", `/usermanager/auth_list/`, data)
  },

  // 修改认证系统
  modifyQAuth(data) {
    return request("put", `/usermanager/auth_edit/`, data)
  },

  // 删除认证系统
  deleteQAuth(auth_section_key) {
    return request("delete", `/usermanager/auth_edit/?auth_section_key=${auth_section_key}`)
  },

  //登录域列表获取
  getQAuthDomain() {
    return request("get", `/usermanager/domain/`)
  },

  //获取auth朓转链接
  getDomainUrl(data){
    return request("get", `/usermanager/oauth/`, data)

  }


}
